package com.hzhq.contract.repo;

import com.hzhq.contract.bean.entity.*;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;
import java.util.Optional;

/**
 * @author hzhq
 * @create 2021/4/10 11:49 下午
 * @email hzhq1255@163.com
 */
public interface UserRoleRepository extends MongoRepository<UserRole, ObjectId> {


    List<UserRole> findByUserAndDeleted(User user, Integer deleted);

    List<UserRole> findByAdminAndDeleted(Admin admin , Integer deleted);

    List<UserRole> findByUserAndDeletedAndPassed(User user,Integer deleted,Integer passed);

}